# -*- coding:utf-8 -*-
import os
import os.path
class Scrap(object):
    def __init__(self,Num):
        self.result=''
        self.rootdir="/home/wangxinshuo/car"
        for parent,dirnames,filenames in os.walk(self.rootdir):
            for Num2 in filenames:
                File=open("./car%s"%Num2,"r+")
                Line=File.readline().split()
                if(len(Line)>0):
                    if(Line[0]==Num.encode('utf-8')):
                        self.result+= "删除成功!"
                        File.close()
                        File = open("./car%s" % Num2, "w")
                        os.remove("./car%s" % Num2)
                        File.close()

    def return_result(self):
        return self.result